package com.amin.app.web.service;

import com.amin.app.web.entity.SDict;
import com.amin.app.web.entity.SDictList;
import com.amin.app.web.mapper.DictListMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 字典列表实现类
 * 20210717
 */
@Service
public class DictListService {
    final
    DictListMapper dictListMapper;

    public DictListService(DictListMapper dictListMapper) {
        this.dictListMapper = dictListMapper;
    }

    public List<SDictList> getDictListByDictType(String dictType) {
        return dictListMapper.getDictListByDictType(dictType);
    }

    public List<SDictList> getDictList(SDictList sDictList) {
        return dictListMapper.getDictList(sDictList);
    }

    public SDictList getDictById(Integer id) {
        return dictListMapper.getDictById(id);
    }

    public void save(SDictList sDictList) {
        dictListMapper.save(sDictList);
    }

    public void update(SDictList sDictList) {
        dictListMapper.update(sDictList);
    }

    public void delById(Integer id) {
        dictListMapper.delById(id);
    }
}
